<template>
	<div class="inviocelist">
<!-- 	  <div class="inviocelist_head">
	  	<div class="inviocelist_head_img">
	  		 <img :src="userinfo.headimgurl" alt="">
	  	</div>
	  	<span>{{userinfo.name}}</span>
	  </div> -->
        <div class="nullorder" v-if="nullorder">
        	<img src="../../assets/image/no_order.png" alt="">
        	<br>暂无开票记录
		</div>
	  <router-link :to="{path:'/inviocedetail',query:{orderNumber:item.orderNumber,hide:'1'}}"  class="input_list" v-for="item in list" >
	    <div class="input_item input_item1">
	      <div class="input_left inviocelist_hotel">
	      	<img :src="item.logo" alt="">
            <span>{{item.hotel_name}}</span>
	      </div>
	      <div class="input_right insuccess" v-if="item.status=='开票中'">开票中</div>
	      <div class="input_right success" v-if="item.status=='开票成功'">开票成功</div>
	    </div> 

	    <div class="input_item" >
	      <div class="input_left">发票抬头</div>
	      <div class="input_right">{{item.rise}}</div>
	    </div> 
	    <div class="input_item">
	      <div class="input_left">发票金额</div>
	      <div class="input_right">¥{{item.price}}</div>
	    </div> 	
	    <div class="input_item">
	      <div class="input_left">开票日期</div>
	      <div class="input_right">{{item.create_time}}</div>
	    </div> 		    	    
	   </router-link>   
	</div>	
</template>
<script>
import axios from 'axios';
import {Toast } from 'mint-ui';
	export default{
		data(){
			return{
               list:[],
               userinfo:'',
               nullorder:false//发票记录为空
			}
		},
		created(){
	      axios.post("/Weixin/Member/memberDetail",{}).then((res)=>{
	        if(res.data.code == "1"){
	        	this.userinfo = res.data.data;
	        }
	      }) 			
	      axios.post("/Weixin/Order/invoiceList",{}).then((res)=>{
	        if(res.data.code == "1"){
	          this.list = res.data.data
	        }
	        else{
	        	this.nullorder = true;
	        }
	      })
		}
	}
</script>
<style scoped>
   .inviocelist .input_list{
     padding:0;
     display:block;

   } 
     .inviocelist .input_item{
     	padding-left:15px;
     	padding-right:15px;
     	border-bottom:0 none;
     }
	.inviocelist .input_left{
		font-size: 15px;
		color: #979797;		
	} 
	.inviocelist  .inviocelist_hotel{
		font-size: 17px;
	
		display:flex;
		align-items:center;
	}
	.inviocelist  .inviocelist_hotel img{
		width:38px;
		height:38px;
		border-radius:50%;
		margin-right:9px;

	}
	.inviocelist  .inviocelist_hotel span{
	color:#333333 !important;
	}
	.inviocelist .input_item1{
		height:52px;
		border-bottom: 1px solid #EEEEEE;
		margin-left:0 !important;
		margin-right:0 !important;
	}

		.nullorder{
		margin: 0 auto;
		text-align:center;
		font-size: 15px;
		color: #333333;

	}
		.nullorder img{
			margin-top:159px;
			width:110px;
			height:86px;
		}
</style>